import { service } from './Request'
import qs from 'qs'

const allApi = {
    addData(params) {
        return service({
            url: "carInfo/car",
            method: "post",
            data: qs.stringify(params[1]),
            headers: {
                'Authorization': params[0]
            }
        })
    },
    getData(params) {
        return service({
            url: `/carInfo/car/${params[1]}`,
            method: "get",
            headers: {
                'Authorization': params[0]
            }
        })
    },
    editData(params) {
        return service({
            url: `/carInfo/car/${params[1]}`,
            method: "put",
            data: qs.stringify(params[2]),
            headers: {
                'Authorization': params[0]
            }
        })
    }
}
export default allApi